package com.bocai.user.controller;

import com.bocai.user.service.FileService;
import com.bocai.user.service.UserService;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class UserController {


    //@Reference(version = "1.0.0",check = true)//check =true 启动依赖检查
    @Autowired
    private UserService userService;

    @Autowired
    private FileService fileService;

    @RequestMapping("/sayHello")
    public String sayHello() {
        return userService.sayHello();
    }

    @RequestMapping("upload")
    public void upload(@RequestParam(value = "msg") String msg) {
        fileService.upload(msg);
    }
}
